//1.导入vue-router 包
import VueRouter from 'vue-router'


//7-14导入对应的路由组件
import HomeContainer from './component/tabbar/HomeContainer.vue'
import MemberContainer from './component/tabbar/MemberContainer.vue'
import ShopcarContainer from './component/tabbar/ShopcarContainer.vue'
import SearchContainer from './component/tabbar/SearchContainer.vue'
import NewList from './component/news/newlist.vue'
import NewsInfo from './component/news/NewsInfo.vue'
import PhotoList from './component/photos/PhotoList.vue'
import Photoinfo from './component/photos/Photoinfo.vue'
import GoodsList from './component/goods/GoodsList.vue'
import GoodsInfo from './component/goods/GoodsInfo.vue'
import GoodsDesc from './component/goods/GoodsDesc.vue'
import GoodsComment from './component/goods/GoodsComment.vue'


//3.创建路由对象
var router = new VueRouter({
	routes:[
      {path:'/',redirect:'/home'},
	  {path:'/home',component:HomeContainer},
	  {path:'/member',component:MemberContainer},
	  {path:'/shopcar',component:ShopcarContainer},
	  {path:'/search',component:SearchContainer},
	  {path:'/home/newlist',component:NewList},
	  {path:'/home/newsinfo/:id',component:NewsInfo},
	  {path:'/home/photolist',component:PhotoList},
	  {path:'/home/photoinfo/:id',component:Photoinfo},
	  {path:'/home/goodslist',component:GoodsList},
	  {path:'/home/goodsinfo/:id',component:GoodsInfo,name:"goodsinfo"},
	  {path:'/home/goodsdesc/:id',component:GoodsDesc,name:"goodsdesc"},
	  {path:'/home/goodscomment/:id',component:GoodsComment,name:"goodscomment"}
	],
	linkActiveClass:"mui-active" //覆盖默认的路由高亮类，默认的类叫做router-link-active
	
})

export default router